Virtual machines are software concepts that provide a layer between an operating system and applications and physical computing resources. The software emulates the qualities of a target physical hardware platform so that an operating system and applications running on the virtual machine act as if they are executing on a physical machine with the emulated qualities. The actual physical computing resources may be used to execute many virtual machines at the same time. In many cases, a hypervisor is used to manage the resources of the physical machine and to start one or more virtual machines running on the physical machine. Virtual machines can often be paused, moved to another physical machine, and resumed, all with little or no interruption to the operating system and applications running on the virtual machine. Thus, virtual machines have become a great tool for datacenters, particularly those hosting multiple tenants (e.g., application service providers, and the like). The manager of the datacenter need only ensure that each virtual machine has the resources that it needs, rather than managing the actual software running on the virtual machine.
Appliances, especially virtual appliances where a specific application along with the necessary operating environment is packaged as a single deployable image, have become a popular distribution format for software vendors. Before this appliance image can be deployed, the image needs to be customized and this operation is typically referred to as provisioning. Several aspects of the appliance will typically need to be customized: 1) hardware resources to be allocated to the virtual machine, and 2) injecting state into the virtual machine to provision the virtual machine. State may include information such as user accounts/passwords, secure shell (SSH) keys, network configuration (e.g., Internet Protocol (IP) addresses, domain name, and so on), and so forth. Because each virtual machine will use a different IP address, host name, and so forth, simply cloning the virtual machine image is insufficient to provision the virtual machine and prepare it for use.
While the hardware customization can be done without launching the virtual machine, most schemes currently in use require the virtual machine to be running to inject state into the virtual machine. For instance, MICROSOFT™ WINDOWS™ uses a tool called sysprep to automate the customization. Sysprep can only run while the virtual machine is running and thus an administrator first sets up the hardware customization and launches the virtual machine, then runs sysprep on each one to complete provisioning. If the administrator is provisioning many (e.g., hundreds or thousands) of virtual machines, then provisioning very quickly becomes a tedious and time-consuming task. Other mechanisms in use include “first boot configuration”. In all these schemes, the virtual machine needs to be executing to perform the final provisioning/customization.